home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Basic / Visual Basic.60 / VB98 / WIZARDS / PDWIZARD / SETUP1 / DSKSPACE.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-06-18  |  11.4 KB  |  351 lines

  1. VERSION 5.00
  2. Begin VB.Form frmDskSpace 
  3.    AutoRedraw      =   -1  'True
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "#"
  6.    ClientHeight    =   2550
  7.    ClientLeft      =   870
  8.    ClientTop       =   1530
  9.    ClientWidth     =   5355
  10.    ClipControls    =   0   'False
  11.    BeginProperty Font 
  12.       Name            =   "MS Sans Serif"
  13.       Size            =   8.25
  14.       Charset         =   0
  15.       Weight          =   700
  16.       Underline       =   0   'False
  17.       Italic          =   0   'False
  18.       Strikethrough   =   0   'False
  19.    EndProperty
  20.    Icon            =   "dskspace.frx":0000
  21.    LinkTopic       =   "Form1"
  22.    LockControls    =   -1  'True
  23.    MaxButton       =   0   'False
  24.    MinButton       =   0   'False
  25.    ScaleHeight     =   2550
  26.    ScaleWidth      =   5355
  27.    Begin VB.CommandButton cmdExit 
  28.       Cancel          =   -1  'True
  29.       Caption         =   "#"
  30.       BeginProperty Font 
  31.          Name            =   "MS Sans Serif"
  32.          Size            =   8.25
  33.          Charset         =   0
  34.          Weight          =   400
  35.          Underline       =   0   'False
  36.          Italic          =   0   'False
  37.          Strikethrough   =   0   'False
  38.       EndProperty
  39.       Height          =   420
  40.       Left            =   3570
  41.       MaskColor       =   &H00000000&
  42.       TabIndex        =   2
  43.       Top             =   1965
  44.       Width           =   1560
  45.    End
  46.    Begin VB.CommandButton cmdInstall 
  47.       Caption         =   "#"
  48.       BeginProperty Font 
  49.          Name            =   "MS Sans Serif"
  50.          Size            =   8.25
  51.          Charset         =   0
  52.          Weight          =   400
  53.          Underline       =   0   'False
  54.          Italic          =   0   'False
  55.          Strikethrough   =   0   'False
  56.       EndProperty
  57.       Height          =   420
  58.       Left            =   1875
  59.       MaskColor       =   &H00000000&
  60.       TabIndex        =   1
  61.       Top             =   1965
  62.       Width           =   1560
  63.    End
  64.    Begin VB.CommandButton cmdChgDrv 
  65.       Caption         =   "#"
  66.       Default         =   -1  'True
  67.       BeginProperty Font 
  68.          Name            =   "MS Sans Serif"
  69.          Size            =   8.25
  70.          Charset         =   0
  71.          Weight          =   400
  72.          Underline       =   0   'False
  73.          Italic          =   0   'False
  74.          Strikethrough   =   0   'False
  75.       EndProperty
  76.       Height          =   420
  77.       Left            =   192
  78.       MaskColor       =   &H00000000&
  79.       TabIndex        =   0
  80.       Top             =   1968
  81.       Width           =   1560
  82.    End
  83.    Begin VB.Label lblDisk 
  84.       BorderStyle     =   1  'Fixed Single
  85.       BeginProperty Font 
  86.          Name            =   "MS Sans Serif"
  87.          Size            =   8.25
  88.          Charset         =   0
  89.          Weight          =   400
  90.          Underline       =   0   'False
  91.          Italic          =   0   'False
  92.          Strikethrough   =   0   'False
  93.       EndProperty
  94.       Height          =   216
  95.       Index           =   0
  96.       Left            =   240
  97.       TabIndex        =   4
  98.       Top             =   1308
  99.       Visible         =   0   'False
  100.       Width           =   504
  101.    End
  102.    Begin VB.Label lblAvail 
  103.       Alignment       =   1  'Right Justify
  104.       BorderStyle     =   1  'Fixed Single
  105.       BeginProperty Font 
  106.          Name            =   "MS Sans Serif"
  107.          Size            =   8.25
  108.          Charset         =   0
  109.          Weight          =   400
  110.          Underline       =   0   'False
  111.          Italic          =   0   'False
  112.          Strikethrough   =   0   'False
  113.       EndProperty
  114.       Height          =   216
  115.       Index           =   0
  116.       Left            =   2340
  117.       TabIndex        =   5
  118.       Top             =   1308
  119.       Visible         =   0   'False
  120.       Width           =   1260
  121.    End
  122.    Begin VB.Label lblNeed 
  123.       Alignment       =   1  'Right Justify
  124.       BorderStyle     =   1  'Fixed Single
  125.       BeginProperty Font 
  126.          Name            =   "MS Sans Serif"
  127.          Size            =   8.25
  128.          Charset         =   0
  129.          Weight          =   400
  130.          Underline       =   0   'False
  131.          Italic          =   0   'False
  132.          Strikethrough   =   0   'False
  133.       EndProperty
  134.       Height          =   216
  135.       Index           =   0
  136.       Left            =   3888
  137.       TabIndex        =   6
  138.       Top             =   1308
  139.       Visible         =   0   'False
  140.       Width           =   1260
  141.    End
  142.    Begin VB.Label lblReq 
  143.       Alignment       =   1  'Right Justify
  144.       BorderStyle     =   1  'Fixed Single
  145.       BeginProperty Font 
  146.          Name            =   "MS Sans Serif"
  147.          Size            =   8.25
  148.          Charset         =   0
  149.          Weight          =   400
  150.          Underline       =   0   'False
  151.          Italic          =   0   'False
  152.          Strikethrough   =   0   'False
  153.       EndProperty
  154.       Height          =   216
  155.       Index           =   0
  156.       Left            =   804
  157.       TabIndex        =   7
  158.       Top             =   1308
  159.       Visible         =   0   'False
  160.       Width           =   1260
  161.    End
  162.    Begin VB.Shape shpSpace 
  163.       BorderColor     =   &H00000000&
  164.       Height          =   396
  165.       Left            =   192
  166.       Top             =   1224
  167.       Width           =   4980
  168.    End
  169.    Begin VB.Label lblDiskH 
  170.       AutoSize        =   -1  'True
  171.       Caption         =   "#"
  172.       BeginProperty Font 
  173.          Name            =   "MS Sans Serif"
  174.          Size            =   8.25
  175.          Charset         =   0
  176.          Weight          =   400
  177.          Underline       =   0   'False
  178.          Italic          =   0   'False
  179.          Strikethrough   =   0   'False
  180.       EndProperty
  181.       Height          =   195
  182.       Left            =   240
  183.       TabIndex        =   8
  184.       Top             =   1005
  185.       Width           =   105
  186.    End
  187.    Begin VB.Label lblAvailH 
  188.       Alignment       =   1  'Right Justify
  189.       Caption         =   "#"
  190.       BeginProperty Font 
  191.          Name            =   "MS Sans Serif"
  192.          Size            =   8.25
  193.          Charset         =   0
  194.          Weight          =   400
  195.          Underline       =   0   'False
  196.          Italic          =   0   'False
  197.          Strikethrough   =   0   'False
  198.       EndProperty
  199.       Height          =   408
  200.       Left            =   2352
  201.       TabIndex        =   11
  202.       Top             =   804
  203.       Width           =   1260
  204.       WordWrap        =   -1  'True
  205.    End
  206.    Begin VB.Label lblNeedH 
  207.       Alignment       =   1  'Right Justify
  208.       Caption         =   "#"
  209.       BeginProperty Font 
  210.          Name            =   "MS Sans Serif"
  211.          Size            =   8.25
  212.          Charset         =   0
  213.          Weight          =   400
  214.          Underline       =   0   'False
  215.          Italic          =   0   'False
  216.          Strikethrough   =   0   'False
  217.       EndProperty
  218.       Height          =   408
  219.       Left            =   3888
  220.       TabIndex        =   10
  221.       Top             =   804
  222.       Width           =   1260
  223.       WordWrap        =   -1  'True
  224.    End
  225.    Begin VB.Label lblReqH 
  226.       Alignment       =   1  'Right Justify
  227.       Caption         =   "#"
  228.       BeginProperty Font 
  229.          Name            =   "MS Sans Serif"
  230.          Size            =   8.25
  231.          Charset         =   0
  232.          Weight          =   400
  233.          Underline       =   0   'False
  234.          Italic          =   0   'False
  235.          Strikethrough   =   0   'False
  236.       EndProperty
  237.       Height          =   408
  238.       Left            =   804
  239.       TabIndex        =   9
  240.       Top             =   804
  241.       Width           =   1260
  242.       WordWrap        =   -1  'True
  243.    End
  244.    Begin VB.Shape shpHeading 
  245.       BorderColor     =   &H00000000&
  246.       Height          =   480
  247.       Left            =   192
  248.       Top             =   744
  249.       Width           =   4980
  250.    End
  251.    Begin VB.Label lblNoSpace 
  252.       AutoSize        =   -1  'True
  253.       Caption         =   "#"
  254.       BeginProperty Font 
  255.          Name            =   "MS Sans Serif"
  256.          Size            =   8.25
  257.          Charset         =   0
  258.          Weight          =   400
  259.          Underline       =   0   'False
  260.          Italic          =   0   'False
  261.          Strikethrough   =   0   'False
  262.       EndProperty
  263.       Height          =   195
  264.       Left            =   195
  265.       TabIndex        =   3
  266.       Top             =   150
  267.       Width           =   105
  268.    End
  269. Attribute VB_Name = "frmDskSpace"
  270. Attribute VB_GlobalNameSpace = False
  271. Attribute VB_Creatable = False
  272. Attribute VB_TemplateDerived = False
  273. Attribute VB_PredeclaredId = True
  274. Attribute VB_Exposed = False
  275. Option Explicit
  276. Option Compare Text
  277. ' Form/Module Constants
  278. Const strFMT$ = "######0 K"
  279. Private Sub cmdChgDrv_Click()
  280.     gfRetVal = gintRET_CANCEL
  281.     Unload Me
  282. End Sub
  283. Private Sub cmdExit_Click()
  284.     ExitSetup Me, gintRET_EXIT
  285. End Sub
  286. Private Sub cmdInstall_Click()
  287.     gfRetVal = gintRET_CONT
  288.     Unload Me
  289. End Sub
  290. Private Sub Form_Load()
  291.     Const ONE_K& = 1024
  292.     Dim intIdx As Integer
  293.     Dim lAvail As Long
  294.     Dim lReq As Long
  295.     Dim intHeight As Integer
  296.     Dim intTop As Integer
  297.     SetFormFont Me
  298.     cmdExit.Caption = ResolveResString(resBTNEXIT)
  299.     cmdInstall.Caption = ResolveResString(resBTNINSTALLNOW)
  300.     cmdChgDrv.Caption = ResolveResString(resBTNCHGDRV)
  301.     lblDiskH.Caption = ResolveResString(resLBLDRIVE)
  302.     lblAvailH.Caption = ResolveResString(resLBLAVAIL)
  303.     lblNeedH.Caption = ResolveResString(resLBLNEEDED)
  304.     lblReqH.Caption = ResolveResString(resLBLREQUIRED)
  305.     lblNoSpace.Caption = ResolveResString(resLBLNOSPACE)
  306.     frmDskSpace.Caption = gstrTitle
  307.     intHeight = lblDisk(0).Height * 1.6
  308.     intTop = lblDisk(0).Top
  309.     '
  310.     'borders are for design mode only...
  311.     '
  312.     lblDisk(0).BorderStyle = 0
  313.     lblReq(0).BorderStyle = 0
  314.     lblAvail(0).BorderStyle = 0
  315.     lblNeed(0).BorderStyle = 0
  316.     For intIdx = 1 To Len(gstrDrivesUsed)
  317.         Load lblDisk(intIdx)
  318.         Load lblReq(intIdx)
  319.         Load lblAvail(intIdx)
  320.         Load lblNeed(intIdx)
  321.         lAvail = gsDiskSpace(intIdx).lAvail
  322.         lReq = gsDiskSpace(intIdx).lReq
  323.         lblDisk(intIdx).Caption = Mid$(gstrDrivesUsed, intIdx, 1) & gstrCOLON
  324.         lblReq(intIdx).Caption = Format$(lReq / ONE_K, strFMT)
  325.         lblAvail(intIdx).Caption = Format$(lAvail / ONE_K, strFMT)
  326.         lblNeed(intIdx).Caption = Format$(IIf(lReq > lAvail, lReq - lAvail, 0) / ONE_K, strFMT)
  327.         lblDisk(intIdx).Top = intTop
  328.         lblReq(intIdx).Top = intTop
  329.         lblAvail(intIdx).Top = intTop
  330.         lblNeed(intIdx).Top = intTop
  331.         intTop = intTop + intHeight
  332.         lblDisk(intIdx).Visible = True
  333.         lblReq(intIdx).Visible = True
  334.         lblAvail(intIdx).Visible = True
  335.         lblNeed(intIdx).Visible = True
  336.     Next
  337.     shpSpace.Height = intHeight * (intIdx - 1)
  338.     cmdChgDrv.Top = shpSpace.Top + shpSpace.Height + cmdChgDrv.Height
  339.     cmdInstall.Top = cmdChgDrv.Top
  340.     cmdExit.Top = cmdChgDrv.Top
  341.     frmDskSpace.Height = cmdChgDrv.Top + cmdChgDrv.Height * 2.5
  342.     EtchedLine Me, 100, cmdChgDrv.Top - cmdChgDrv.Height * 0.5, Me.ScaleWidth - 200
  343.     CenterForm Me
  344. End Sub
  345. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  346.     If UnloadMode <> 1 Then
  347.         ExitSetup Me, gintRET_EXIT
  348.         Cancel = 1
  349.     End If
  350. End Sub
  351.